const wearDao = require('../dao/wearDao');

async function findByKind(kind) {
    if (kind == null || kind == {} || kind == undefined || kind == []){
        kind = 'men';
    }
    try{
        //  查询衣服，能返回
        var data = await wearDao.findByKind(kind);
        return {success:true,wears:data};
    }catch (e) {
        //  不能返回
        return {success:false,msg:"database has error!"};
    }

}

exports.findByKind = findByKind;